;Assembler header file for SCSIFS
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:01:39 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 27 June 1995

        [       :LNOT: :DEF: SCSIFS_Hdr
        GBLS    SCSIFS_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_FileCore
        GBLS    Get_FileCore
        ]
        [       :LNOT: :DEF: FileCore_Hdr
Get_FileCore                    SETS    "GET oslib/FileCore.Hdr"
        |
Get_FileCore                    SETS    ""
        ]
        $Get_FileCore

;Symbols for constants
SCSIFS_DriveAbsent              *       &0
SCSIFS_DriveUnready             *       &1
SCSIFS_DriveReady               *       &2

;Symbols for structure offsets and sizes
                                ^       0
                                #       Int
SCSIFS_DriveStatus              *       @


;Symbols for SWI's and SWI reason codes
XSCSIFS_DiscOp                  *       &60980
SCSIFS_DiscOp                   *       &40980

SCSIFSDiscOp_Verify             *       &0
   ;Entry
   ;  R1 = &0 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)
   ;  R4 = size (Int)
   ;Exit
   ;  R2 = next_disc_addr (FileCore_DiscAddress)
   ;  R4 = unverified (Int)

SCSIFSDiscOp_ReadSectors        *       &1
   ;Entry
   ;  R1 = &1 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)
   ;  R3 = data (pointer to data)
   ;  R4 = size (Int)
   ;Exit
   ;  R2 = next_disc_addr (FileCore_DiscAddress)
   ;  R3 = next_data (pointer to data)
   ;  R4 = unread (Int)

SCSIFSDiscOp_WriteSectors       *       &2
   ;Entry
   ;  R1 = &2 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)
   ;  R3 -> data (data)
   ;  R4 = size (Int)
   ;Exit
   ;  R2 = next_disc_addr (FileCore_DiscAddress)
   ;  R3 -> next_data (data)
   ;  R4 = unwritten (Int)

SCSIFSDiscOp_ReadTrack          *       &3
   ;Entry
   ;  R1 = &3 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)
   ;  R3 = data (pointer to data)

SCSIFSDiscOp_ReadId             *       &3
   ;Entry
   ;  R1 = &3 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)
   ;  R3 = data (pointer to data)

SCSIFSDiscOp_WriteTrack         *       &4
   ;Entry
   ;  R1 = &4 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)
   ;  R3 -> data (data)

SCSIFSDiscOp_FormatTrack        *       &4
   ;Entry
   ;  R1 = &4 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)
   ;  R3 = &0
   ;  R4 -> format (FileCore_TrackFormat)

SCSIFSDiscOp_Seek               *       &5
   ;Entry
   ;  R1 = &5 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)

SCSIFSDiscOp_Restore            *       &6
   ;Entry
   ;  R1 = &6 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)

SCSIFSDiscOp_ReadSectorsViaCache *       &9
   ;Entry
   ;  R1 = &9 :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)
   ;  R3 = data (pointer to data)
   ;  R4 = size (Int)
   ;  R6 = cache_handle (Int)
   ;Exit
   ;  R2 = next_disc_addr (FileCore_DiscAddress)
   ;  R3 = next_data (pointer to data)
   ;  R4 = unread (Int)
   ;  R6 = cache_handle_out (Int)

SCSIFSDiscOp_Specify            *       &F
   ;Entry
   ;  R1 = &F :OR: flags (Bits)
   ;  R2 = disc_addr (FileCore_DiscAddress)

XSCSIFS_Drives                  *       &60982
SCSIFS_Drives                   *       &40982
   ;Exit
   ;  R0 = default_drive (Int)
   ;  R1 = floppy_count (Int)
   ;  R2 = hard_disc_count (Int)

XSCSIFS_FreeSpace               *       &60983
SCSIFS_FreeSpace                *       &40983
   ;Entry
   ;  R0 -> disc_name (String)
   ;Exit
   ;  R0 = free (Int)
   ;  R1 = max (Int)

XSCSIFS_DescribeDisc            *       &60985
SCSIFS_DescribeDisc             *       &40985
   ;Entry
   ;  R0 -> disc_name (String)
   ;  R1 = disc (pointer to FileCore_Disc)

XSCSIFS_TestReady               *       &60986
SCSIFS_TestReady                *       &40986
   ;Entry
   ;  R1 = drive_no (Int)
   ;Exit
   ;  R0 = status (SCSIFS_DriveStatus)

XSCSIFS_TestMounted             *       &60987
SCSIFS_TestMounted              *       &40987
   ;Exit
   ;  R0 = flags (Bits)

XSCSIFS_MiscOp                  *       &6098C
SCSIFS_MiscOp                   *       &4098C

XSCSIFS_SectorDiscOp            *       &6098D
SCSIFS_SectorDiscOp             *       &4098D

XSCSIFS_FreeSpace64             *       &60992
SCSIFS_FreeSpace64              *       &40992
   ;Entry
   ;  R0 -> disc_name (String)
   ;Exit
   ;  R0 = free_lo (Bits)
   ;  R1 = free_hi (Int)
   ;  R2 = max (Int)

        ]
        END
